<div class="panel panel-default">
	<div class="panel-heading">
		<b>{{.error.Description}}</b>
	</div>
	<div class="panel-body">

		<ul class="nav nav-tabs" role="tablist">
			<li class="active"><a href="#error_{{.postfix}}" role="tab" data-toggle="tab">Error</a></li>
			<li><a href="#stack_{{.postfix}}" role="tab" data-toggle="tab">Stack</a></li>
			{{if .response}}
				<li><a href="#headers_{{.postfix}}" role="tab" data-toggle="tab">Headers</a></li>
				<li><a href="#body_{{.postfix}}" role="tab" data-toggle="tab">Response Body</a></li>
			{{end}}
		</ul>

		<div class="tab-content" id="result_{{.postfix}}">
			<div class="tab-pane active" id="error_{{.postfix}}">
				<div class="panel panel-danger">
					<div class="panel-heading">
						In {{.error.Path}}{{if .error.Line}} (around {{if .error.Line}}line {{.error.Line}}{{end}}{{if .error.Column}} column {{.error.Column}}{{end}}){{end}}:
					</div>
					<div class="panel-body">
						{{range .error.ContextSource}}
							{{if .IsError}}
								<pre><code class="go">{{.Source}}</code></pre>
							{{end}}
						{{end}}
					</div>
				</div>
			</div>
			<div class="tab-pane" id="stack_{{.postfix}}">
				<pre><code class="bash">{{.error.Stack}}</code></pre>
			</div>
			{{if .response}}
				<div class="tab-pane" id="headers_{{.postfix}}">
					<pre><code class="json">{{.response.Headers}}</code></pre>
				</div>
				<div class="tab-pane" id="body_{{.postfix}}">
					<pre><code class="html">{{.response.Body}}</code></pre>
				</div>
			{{end}}
		</div>

	</div>
</div>
